<template>
	<view class="index">
		<image class="index-img" :src="imgUrl" mode=""></image>
		<view class="index-text">找零工—就上"卓贤人力"</view>
		<view class="index-butt">
			<button class='but' plain @click="okClick('企业端')" style="color: #000;font-weight: 600;">企业端</button>
			<button class='but but1' plain @click="okClick('员工端')">求职端</button>
<!-- 			<button class='but but1' plain withCredentials="true" lang="zh_CN" @click="loinClick">求职登录</button> -->
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				url: '/cleaningAdmin',
				rzimg: `${getApp().globalData.imgScr}bj/rz.png`,
				imgUrl: `${getApp().globalData.imgScr}jd/logo.png`,
				SessionKey: '',
				OpenId: '',
				nickName: null,
				avatarUrl: null,
				isCanUse: uni.getStorageSync('isCanUse') || true, //默认为true
			}
		},
		onShow() {
			getApp().globalData.type = 0
		},
		onLoad(res) {
			if(res.openid) uni.setStorageSync('parent_openid' , res.openid)
		},
		methods: {
			okClick(i) {
				switch (i) {
					case '企业端':
						uni.switchTab({
							url: '/pages/tag/home/home'
						})
						break
					case '员工端':
						uni.reLaunch({
							url: '/cleaningAdmin/home/home'
						})
						break
				}

			},
		}
	}
</script>

<style lang="scss">
	.index {
		display: flex;
		flex-direction: column;
		justify-content: center;
		align-items: center;
		height: 100vh;
		overflow: hidden;

		.index-img {
			width: 230rpx;
			height: 230rpx;
			margin-bottom: 80rpx;
		}

		.index-text {
			width: 410rpx;
			text-align: center;
			font-size: 34rpx;
			font-weight: 600;
			color: #28292c;
			margin-bottom: 200rpx;
		}

		.index-butt {
			.but {
				font-size: 34rpx;
				width: 560rpx;
				font-weight: 500;
				color: #FFFFFF;
				background: linear-gradient(-90deg, #8dc9f1, #d8eefc);
				border-radius: 48rpx;
				line-height: 96rpx;
				border: 0;
			}

			.but1 {
				background: linear-gradient(-90deg, #48AEEC, #5EBFF8);
				margin-top: 40rpx;
			}
		}

		.popup {
			display: flex;
			flex-direction: column;
			align-items: center;
			box-sizing: border-box;
			width: 492rpx;
			border-radius: 20rpx;
			background-color: #ffffff;
			overflow: hidden;

			.p-title {
				position: relative;

				.t-text {
					position: absolute;
					top: 50%;
					left: 50%;
					transform: translate(-50%, -50%);
					font-size: 32rpx;
					font-weight: 600;
					color: #FFFFFF;
				}
			}

			.p-b-box {
				height: 40rpx;
			}

			.p-b-card {
				display: flex;
				flex-direction: column;
				justify-content: center;
				align-items: center;
				margin: 50rpx;

				.c-text {
					font-size: 24rpx;
					font-weight: 600;
					color: #333333;
					margin-bottom: 16rpx;
				}

				.c-text1 {
					text-align: center;
					line-height: 1.8em;
				}
			}
		}

		.p-b-but {
			width: 100%;
			display: flex;
			justify-content: space-between;
			align-items: center;
			box-sizing: border-box;
			margin-bottom: 34rpx;
			padding: 0 54rpx;

			.but {
				flex: 1;
				line-height: 60rpx;
				border: 1rpx solid #B7B7B7;
				border-radius: 30rpx;
				font-size: 24rpx;
				font-weight: 600;
				color: #999999;
				margin: 0;
				padding: 0;
				background-color: #FFFFFF;
			}

			.but1 {
				border: 1rpx solid rgba($color: #000000, $alpha: 0);
				color: #FFFFFF;
				background: linear-gradient(101deg, #53E48D 0%, #53E48D 100%);
				margin-left: 76rpx;
			}

			.but2 {
				display: inline-block;
				width: 218rpx;
				color: #FFFFFF;
				background: linear-gradient(101deg, #53E48D 0%, #53E48D 100%);
			}

			.but::after {
				display: none;
			}
		}

		.get-tel {
			position: relative;
			display: flex;
			flex-direction: column;
			justify-content: space-between;
			align-items: center;
			width: 508rpx;
			padding: 40rpx;
			border-radius: 20rpx;
			overflow: hidden;
			background-color: #FFFFFF;

			.ionc {
				position: absolute;
				top: 16rpx;
				right: 16rpx;
			}

			.tel-title {
				font-size: 50rpx;
				font-size: #000000;
				font-weight: 500;
				margin-bottom: 40rpx;
			}

			.tel-text {
				font-size: 32rpx;
				font-size: #737373;
				font-weight: 500;
				text-align: center;
			}

			.but {
				display: flex;
				justify-content: center;
				width: 100%;
				margin-top: 100rpx;

				.butt {
					font-size: 40rpx;
					font-weight: 500;
					color: #FFFFFF;
					background: linear-gradient(-90deg, #8dc9f1, #d8eefc);
					border-radius: 40rpx;
					line-height: 80rpx;
					border: 0;
					padding: 0 60rpx;
				}
			}
		}
	}
</style>
